package com.forest.client.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author: Forest
 * @Date: 2017/2/14 21:50
 */
@RestController
public class ConsumerController {
    @Resource
    RestTemplate restTemplate;

    @RequestMapping("/app")
    public String app(){
        return restTemplate.getForEntity("http://forest-server/info?a=lmhy&b=forest",String.class).getBody();
    }
}
